home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-04-18 | 96.1 KB | 2,773 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ED - A PROGRAM TEXT EDITOR
-
- USER'S MANUAL
-
- Rev 1.05
-
- (c) Copyright Ed Gilbert 1984
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 1. GENERAL INFORMATION
-
- ED is a full screen text editor program. Versions of the program
- exist to run on a variety of MS-DOS computers made by IBM,
- Hewlett-Packard, and others. These include the IBM models PC,
- XT, AT, and the Hewlett-Packard models 150, 110, 110-Plus, and
- Vectra.
-
- The basic operation of the editor is to create and edit disk text
- files. Files are read from a disk into the editor's workspace
- buffer where the editing changes occur. No changes are made to
- the original disk file until a command is given to write the
- workspace buffer back onto the disk. The editor has commands to
- insert, delete, and change the text in this buffer. Since the
- entire file resides in memory during the edit session, any part
- of the file can be accessed quickly.
-
- The editor makes use of all available computer memory so that
- large files can be edited. The editor itself requires about 45K
- bytes for its execution. The remaining memory is available for
- use as the editor's file buffer(s). On most MS-DOS computers,
- this limits the maximum size of a file that can be edited to
- about 580K bytes.
-
- The editor's commands are optimized for working with program
- source files. It is not designed to be a word processor, al-
- though some basic word processing functions such as tab setting,
- wordwrap and paragraph formatting are included. A good comple-
- ment of file and block commands exist for moving sections of
- program code between and within files. Some of the more advanced
- commands include split-screen, multi-file editing, and the
- ability to execute MS-DOS commands, including running other
- programs, from within the editor. The word processing functions
- are intended for program documentation, and are usually suffi-
- cient for memos, letters or other short documents. A separate
- text formatting program is required for printing with page for-
- matting, margins, headers, print font enhancements, etc.
-
- The editor has two types of commands. Frequently used functions,
- such as scrolling or deleting characters, are invoked by editing
- keys that are generally labelled for these purposes on the
- keyboard. Less frequently used, but more powerful, or broader in
- scope, are the multi-keystroke commands. These commands are used
- to control file, block, search/replace and other such functions.
- All multi-keystroke commands are begun by pressing the ESCAPE
- key, followed by one or more additional keys. The additional
- keystrokes are the first characters of the command names being
- selected. While entering a command, the choices are visible on a
- command line, and a second line gives a full sentence description
- of any command keyword.
-
-
-
-
-
-
- (E.Y.G.) - 1 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 1.1 Program Versions and Requirements
-
- Several versions of the editor exist to accomodate the differen-
- ces between IBM and Hewlett-Packard MS-DOS computers. The dif-
- ferences between these versions are in the keyboard and display
- code. The commands and functions of all versions of the editor
- are otherwise identical.
-
- All versions of the editor require MS-DOS version 2.0 or later,
- and at least 60K bytes of free memory. Additional memory is
- recommended. The editor makes use of all available memory.
-
- The IBM PC version of the editor runs on the PC, PC-Jr, PC-XT,
- PC-AT, and compatible computers from other manufacturers (e.g.
- AT&T, Compaq, and HP-Vectra). It will run with either the
- Monochrome or Color display cards. If a system has both
- monochrome and color display cards, the editor uses the
- monochrome display. White characters are formed on the color
- display using a black background.
-
- The HP150 version of the editor runs on the A, B, and C models.
-
- Except where it explicitly mentions differences, this manual ap-
- plies to all program versions. This manual will use the editing
- key names that appear on the HP150 and HP110 keyboards. If the
- IBM keyboard uses a different key to accomplish the same action,
- the equivalent IBM key will be given in parentheses.
-
-
-
-
- 2. EDITOR OPERATION
-
- This section describes the operation of the editor. Some of the
- commands and editing keys are also discussed, but Section 3,
- "General Reference", is a more complete reference to these sub-
- jects.
-
-
-
- 2.1 Running the Editor
-
- From the MS-DOS command prompt (>), type "ed". When the editor
- is first run, it prompts for the name of a file to to edit. For
- example, to edit file sample.pas:
-
- A>ed
- Edit what file? sample.pas
-
- You can include the name of the file to be edited on the MS-DOS
- command line. For example:
-
-
-
-
-
- (E.Y.G.) - 2 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- A>ed sample.pas
-
- In both examples the file sample.pas is searched for in the cur-
- rent directory. If the file is found, the entire file is read
- into a buffer and the beginning lines of the file are displayed.
- If the file is not found, a file of that name will be created in
- the current directory when the buffer is saved.
-
-
-
- 2.2 Crossing Directories
-
- If the editor is not in the current directory, you must use the
- MS-DOS PATH command to set the path to its directory. For ex-
- ample, if ED is in the directory \utils, you can set the path by
- typing
-
- A>path \utils
-
- If you want to edit a file that is not in the current directory,
- you can specify the path as part of the filename. Examples:
-
- A>ed \user\c_comp\prog.c
- A>ed applic\prog.bas
- A>ed ..\stdio.h
-
-
-
- 2.3 Exiting the editor
-
- If you want to abandon a file buffer without saving your work,
- use the command File Quit. If any changes have been made to the
- current file buffer during the edit session, you are asked to
- confirm the command. Select Yes to exit, or No to continue edit-
- ing. If you exit a buffer when two file buffers are in use, the
- other file buffer becomes active and is displayed. If only a
- single file buffer is in use, the editor exits to MS-DOS.
-
- The File Save+exit command saves the current file buffer and
- either switches to the other file buffer or exits to MS-DOS,
- depending on whether one or two file buffers are active.
-
-
-
- 2.4 Use of Computer Memory
-
- When the editor is run, it normally obtains from MS-DOS all but
- the top 14K bytes (19K on IBM-PC) of available RAM for its
- workspace. This top portion of RAM is used by the MS-DOS command
- parser, COMMAND.COM. If it is overwritten by an application
- program such as ED, it must be reloaded when the application is
- finished running.
-
-
-
-
- (E.Y.G.) - 3 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- The editor can only edit files that fit entirely within its
- workspace. If you are editing a very large file and need the ad-
- ditional 14K bytes of memory, you can use the /a switch from the
- MS-DOS command line to obtain the additional memory for the
- editor's workspace. For example:
-
- A>ed sample.pas /a
-
- If you use the /a switch, the upper part of COMMAND.COM will be
- overwritten. When you exit the editor, MS-DOS will attempt to
- reload the part of COMMAND.COM that was overwritten. If it can-
- not be found on your disk, the computer will display a message
- asking you to insert your system disk into the drive.
-
-
-
- 2.5 File Buffers
-
- A buffer is a region of memory in the computer that holds data.
- The editor makes use of several buffers. Files being edited are
- read from disk into a file workspace buffer, and any changes made
- to the file held in the buffer do not affect the file on the disk
- until you explicitly command the buffer to be written to the
- disk.
-
- The editor has two file buffers, allowing two files to be edited
- at the same time. These are allocated dynamically from the pool
- of memory that is available to the editor. There is no fixed
- limit on the size of these buffers, except that their sum cannot
- exceed the available free memory in the computer. The size of
- the current file buffer, and the size of the remaining free
- memory are displayed on the status line.
-
-
-
- 2.5.1 The Block Buffer
-
- The editor maintains a block buffer for copying, moving, and
- deleting blocks of text. The block buffer uses only enough
- memory to hold a deleted or copied block, and it holds this text
- until it is overwritten by another block command.
-
-
-
- 2.5.2 The Deleted Line Buffer
-
- Whenever a single line is deleted, either with the DELETE LINE
- (SHIFT-DEL) key or the CLEAR LINE (SHIFT-END) key, a line buffer
- keeps a copy of the deleted line. It can be recovered using the
- Undelete command. The line buffer stores only the most recently
- deleted line. This buffer has a maximun length of 500 charac-
- ters. If you delete a line longer than this, only the first 500
- characters of the line can be recovered.
-
-
-
- (E.Y.G.) - 4 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 2.6 Edit Modes
-
- The editor has two basic modes of operation, command mode and
- edit mode. In the edit mode, the cursor can be moved to any
- character in the file buffer using the cursor control keys, and
- text can be entered from the keyboard into the file at the cursor
- location. Edit mode has two forms of text entry, INSERT and
- REPLACE. In the INSERT mode, characters are inserted into the
- file buffer to the left of the cursor position. When the editor
- is first run, it wakes up in this mode, and the word INSERT is
- displayed on the status line.
-
- The INSERT CHAR (INS) key toggles the form of text entry from
- INSERT to REPLACE, and vice versa. In the REPLACE mode, each
- character entered from the keyboard over-writes the character at
- the cursor's location.
-
-
-
- 2.7 Command Mode
-
- Commands make larger changes to the file buffer or change the
- editing environment. The editor commands are organized as a
- multi-level menu. The command mode is entered by pressing the
- ESCAPE key. In this mode, the top line of the screen shows a
- menu of keywords. One of the keywords is always highlighted, and
- the message line gives a description of this keyword.
-
- Command keywords are selected in one of two ways:
-
- 1. Use the cursor control keys to highlight the desired
- keyword, then press the RETURN key.
-
- 2. Enter the first character of the desired keyword. This is
- the faster method once you become familiar with the com-
- mands.
-
- Many commands require several keystrokes before the command is
- completed. You can back up out of the command tree one level at
- a time using the ESCAPE key.
-
- Some commands prompt you to enter information, such as a
- filename, a line number, or a search string. Most such commands
- remember and initially display your previous entry. The follow-
- ing rules apply:
-
- - To enter the old response again press the RETURN key. Any
- other key will erase your previous response and begin the
- new input.
-
- - To edit your input, use the BACKSPACE key.
-
-
-
-
-
- (E.Y.G.) - 5 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- - To complete your input, use the RETURN key.
-
- - To cancel the command and backup to the previous level in
- the command tree, use the ESCAPE key.
-
- Some commands take several seconds to complete. During this
- time, the command line displays "WAIT .....". When the command
- successfully completes, the editor returns to the edit mode.
-
- Sometimes a command cannot be completed. Perhaps a file cannot
- be opened, or a search string cannot be found. In this case the
- editor beeps and displays a message in inverse video on the mes-
- sage line. The editor may be left in either the edit mode or the
- command mode, whichever is more appropriate for the next action.
-
-
-
- 2.8 The Display Screen
-
- The editor's display screen is divided into separate areas for
- the text of the file(s) being edited and status information about
- the editing environment.
-
-
-
- 2.8.1 The Command Line
-
- The top line of the screen is the command line. In the command
- mode, this line displays command keywords. In the edit mode,
- this line identifies the editor program name and revision.
-
-
-
- 2.8.2 The Message Line
-
- The second line of the screen is the message line. In the edit
- mode it displays the name of the file being edited. In the com-
- mand mode, a description of the highlighted command keyword ap-
- pears on this line.
-
-
-
- 2.8.3 The Status Line
-
- The third line displays information about the state of the cur-
- rent or active file buffer. The individual fields of the status
- line are described below in the order in which these fields
- occur, beginning with the leftmost field.
-
- CAPS If the caps lock key is active, this field is visible.
- Otherwise, this field is blank.
-
-
-
-
-
- (E.Y.G.) - 6 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- INSERT/REPLACE
- The current mode of text input is displayed in this
- field.
-
- COL= The column number occupied by the cursor, beginning
- with column 1 as the leftmost column.
-
- LINE= The number of the line containing the cursor, beginning
- with line 1 as the first line of the file buffer.
-
- CHARS= The number of characters in the current file buffer.
-
- FREE= The number of bytes of free memory available to be used
- in the editor's file buffers.
-
- CA If the Define Case command has been given, this field
- is visible. It indicates that the Search and Replace
- commands are sensitive to the case of alpha characters
- in the search pattern.
-
- SP If the Define No-tabs command has been given, this
- field is visible. It indicates that the TAB key will
- insert ASCII spaces rather than tabs into the file
- buffer.
-
- WR If the Define Wordwrap Enable command has been given,
- this field is visible.
-
-
-
- 2.8.4 The File Windows
-
- The area between the status line and the bottom of the screen
- displays the text of the file buffer(s) being edited. This area
- may contain one or two windows. If two windows are in use the
- screen is divided by a line of hyphens.
-
-
-
- 2.9 Moving the Cursor
-
- The editor uses a blinking cursor to identify the region in the
- file buffer around which editing takes place. The keyboard has
- several keys that move the cursor. The four keys with arrows,
- LEFT, RIGHT, UP, and DOWN, move the cursor in the indicated
- directions. The cursor can only be moved to areas on the screen
- where text (or space characters) is displayed.
-
- The last characters on each line, with the exception of the last
- line in the file buffer, are a carriage return followed by a line
- feed (CRLF). Both of these characters are inserted into the file
- buffer when you press the RETURN key while in the INSERT mode.
- These characters are not displayed, and in many ways the editor
-
-
-
- (E.Y.G.) - 7 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- treats them as a single character. If the cursor is placed to
- the right of the last character on a line, it is considered to be
- at the position of the CRLF. If you attempt to move the cursor
- to the right of this position, the cursor moves to the first
- character of the next line. If you press the DELETE CHAR (DEL)
- key while the cursor is at the end of a line, both the carriage
- return and the line feed are deleted from the file buffer, and
- the next line is moved up and appended to the current line.
-
- The editor has automatic scrolling, meaning the displayed text
- automatically shifts horizontally and vertically when you try to
- move the cursor past the limits of the display window. When you
- scroll vertically using the UP or DOWN keys, the cursor attempts
- to maintain the same column position on each new line. If you
- move the cursor to a short line which does not extend to the
- cursor's current column, the cursor temporarily shifts columns to
- the end of the short line. If the cursor is subsequently moved
- to a longer line, it returns to its original column.
-
- The displayed text can be rolled up or down without changing the
- cursor's position within the file buffer. This is done by hold-
- ing down the SHIFT key and pressing UP or DOWN. The cursor
- remains at its character position until it bumps into the upper
- or lower boundary of the window.
-
- The cursor can be moved directly to the beginning or end of a
- line by holding down the SHIFT key and pressing the LEFT or RIGHT
- cursor key.
-
- The cursor can be moved to the beginning of the next or previous
- word using the CTRL and RIGHT or LEFT cursor keys.
-
- The cursor can be moved through the file in steps of nearly a
- full window of text by using the PREV (PgUp) and NEXT (PgDn)
- keys.
-
- The cursor can be moved directly to the first character in the
- file buffer using the HOME key, and to the last character in the
- file buffer using the SHIFT and HOME keys (END key, unshifted, on
- an IBM PC).
-
-
-
- 2.10 The Marker
-
- A number of commands operate on blocks of text. These include
- moving, copying, deleting, filling, justifying, printing, case
- conversion, and space and tab conversion. A block is a consecu-
- tive group of characters identified by a beginning and an end.
- To identify a block of text you must first specify a position,
- called the marker, at the beginning of the block. To do this
- move the cursor to the first character of the block and give the
- command Define Marker. Thereafter the cursor itself serves as a
-
-
-
- (E.Y.G.) - 8 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- pointer to the end of the block. The block is the region from
- the marker up to but not including the character above the cur-
- sor.
-
- The marker is not a character and cannot be deleted. It is a
- pointer to a position in the file buffer. If characters are in-
- serted or deleted before the marker, the marker remains pointing
- to the same character. If the character that the marker is
- pointing to is deleted, the marker shifts to the right to point
- to the next character in the file buffer.
-
- Whenever a file is read into a file buffer, the marker is ini-
- tialized to point to the first character in the file buffer.
-
-
-
-
- 2.11 Saving the File Buffer
-
- The editor has two commands that save the file buffer under the
- same name as the input file. File Update saves the file buffer
- and returns to the edit mode, while File Save+exit saves and then
- exits the current file buffer. If two file buffers are in use,
- File Save+exit releases the memory used by the saved buffer to
- the free space pool and displays the other file buffer. If only
- a single file buffer is in use, the editor exits to MS-DOS.
-
- With either command the following actions occur:
-
- 1. If the buffer holds a new file that has not yet been named,
- you are prompted for a filename.
-
- 2. If a backup file exists with the same prefix as the file to
- be saved and an extension of ".BAK", that file is deleted.
-
- 3. If the filename to be saved already exists on the disk, it
- is renamed with an extension of ".BAK".
-
- 4. The current file buffer is written to the disk.
-
-
-
- 2.12 Editor Configuration Files
-
- A means is provided of saving the state of many of the editor
- parameters in a disk file, and of having that file automatically
- read and used to initialize the editor when a file is read into a
- file buffer. The editor parameters that are saved in configura-
- tion files are those set by the Define commands, which include
- case sensitivity, use-tabs/no-tabs, tab stops, paragraph margins,
- and wordwrap enable/disable.
-
-
-
-
-
- (E.Y.G.) - 9 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- For example, your system can be configured to automatically turn
- on wordwrap and set paragraph margins whenever files with a
- filename extension of ".DOC" or ".TXT" are read, and to turn
- those wordprocessing functions off and set tabs stops and other
- functions a different way whenever a filename with an extension
- of ".C" is read. A different configuration file can exist for
- each unique filename extension. Using a standard MS-DOS command,
- you can specify in which directory these configuration files will
- be written. By including this command in the AUTOEXEC.BAT batch
- file, it can be invoked every time the computer is turned on.
-
-
-
-
- 2.12.1 Enabling Configuration Files
-
- To enable the use of configuration files, a parameter must be set
- in the MS-DOS environment string. MS-DOS maintains an environ-
- ment string in which parameters can be defined, either from the
- MS-DOS command line, or from batch files, and which can be read
- by application programs such as the editor. The MS-DOS command
- to insert or delete a parameter in the environment is SET. The
- SET command, given without parameters, displays the current con-
- tents of the environment. Given with parameters, it is used to
- insert, change or delete a parameter.
-
- The editor searches the environment for a string of the form
- "EDCONFIG=<dir>", where <dir> is the name of the directory where
- the configuration files are kept. For example, to enable the
- editor to use configuration files in the directory A:\UTILS, give
- the following command:
-
- A>SET EDCONFIG=A:\UTILS
-
- The association of configuration files with the files which are
- edited is by filename extension. When a disk file is read into
- the editor's file buffer, and a string such as
- "EDCONFIG=A:\UTILS" is found in the environment, the editor sear-
- ches the specified directory (in this example A:\UTILS) for a
- file with a filename prefix of "EDCONFIG" and a filename exten-
- sion which is the same as that of the file to be edited.
- Continuing the example, if you begin editing the file "TEST.PAS",
- the editor attempts to open the file "A:\UTILS\EDCONFIG.PAS" and
- uses it to initialize the editing environment of that file buff-
- er.
-
-
-
- 2.12.2 Writing a Configuration File
-
- To write a configuration file, give the command File Profile.
- The current state of the editor will be save in the directory
- named in the MS-DOS environment.
-
-
-
- (E.Y.G.) - 10 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 2.12.3 Disabling Configuration Files
-
- To delete a string from the the MS-DOS environment, use the SET
- command and enter only the left hand portion of the existing
- string up to and including the equal sign (=). In this case,
- give the command
-
- A> SET EDCONFIG=
-
- With the "EDCONFIG=<DIR>" string removed from the environment,
- existing editor configuration files will be ignored, and new con-
- figuration files cannot be written (with File Profile).
-
-
-
-
- 3. GENERAL REFERENCE
-
- This section serves as a reference to the editor's commands and
- special editing keys. Included is a section on ASCII control
- characters which have special meaning within the editor.
-
-
-
- 3.1 Special Editing Keys
-
- This section describes keys that perform special editing func-
- tions. As in the other chapters, the keys are referred to by
- their labels on the HP150 keyboard. If the IBM keyboard has a
- different label, the IBM label is shown in parentheses.
-
- A few of the keys perform functions during command entry, and are
- noted as such.
-
-
-
- 3.1.1 ESCAPE (or F8)
-
- In the edit mode, this key begins a command. The first level
- command choices are then displayed on the first line on the
- screen. Pressing this key while in the command tree backs up one
- step to the previous command keyword.
-
- As a convenience to users who are burdened with an inappropriate-
- ly positioned ESCAPE key (e.g. Vectra), the F8 function key is
- also bound to the escape funtion.
-
-
-
- 3.1.2 CLEAR LINE (SHIFT-END)
-
- Delete text from the cursor to end of the line. The end-of-line
- terminators, a carriage return followed by a line feed (CRLF),
-
-
-
- (E.Y.G.) - 11 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- are not deleted. A deleted line can be restored using the
- Undelete command.
-
-
-
- 3.1.3 DELETE LINE (SHIFT-DEL)
-
- Delete the current line, including the CRLF terminator. A
- deleted line can be restored using the Undelete command.
-
-
-
- 3.1.4 DELETE CHAR (DEL)
-
- Delete the character at the cursor position.
-
-
-
- 3.1.5 INSERT CHAR (INS)
-
- Toggle between INSERT and REPLACE modes.
-
-
-
- 3.1.6 INSERT LINE (SHIFT-INS)
-
- Insert an empty new line (CRLF) before the current line.
-
-
-
- 3.1.7 HOME
-
- In the edit mode, this key positions the cursor at the first
- character in the file buffer. In the command mode, it highlights
- the first command keyword on the command line.
-
-
-
- 3.1.8 SHIFT-HOME (END)
-
- In the edit mode, this key positions the cursor past the last
- character in the file buffer. In the command mode, it highlights
- the last command keyword on the command line.
-
-
-
- 3.1.9 UP
-
- Move the cursor up to the previous line.
-
-
-
-
-
-
-
- (E.Y.G.) - 12 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.1.10 DOWN
-
- Move the cursor down to the next line.
-
-
-
- 3.1.11 LEFT
-
- In the edit mode, this key moves the cursor to the left one
- character. In the command mode, it moves the command highlight
- one keyword to the left.
-
-
-
- 3.1.12 RIGHT
-
- In the edit mode, this key moves the cursor to the right one
- character. In the command mode, it moves the command highlight
- one keyword to the right.
-
-
-
- 3.1.13 SHIFT-UP
-
- Scroll the screen up one line.
-
-
-
- 3.1.14 SHIFT-DOWN
-
- Scroll the screen down one line.
-
-
-
- 3.1.15 SHIFT-LEFT
-
- Position the cursor at the beginning of the line.
-
-
-
- 3.1.16 SHIFT-RIGHT
-
- Position the cursor at the end of the line.
-
-
-
- 3.1.17 CTRL-LEFT
-
- Position the cursor at the start of the previous word.
-
-
-
-
-
-
-
- (E.Y.G.) - 13 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.1.18 CTRL-RIGHT
-
- Position the cursor at the start of the next word.
-
-
-
- 3.1.19 PREV (PgUp)
-
- Move the cursor nearly one full window of text toward the begin-
- ning of the file buffer.
-
-
-
- 3.1.20 NEXT (PgDn)
-
- Move the cursor nearly one full window of text toward the end of
- the file buffer.
-
-
-
- 3.1.21 CAPS (CAPS LOCK)
-
- Toggle the uppercase lock function on and off. When this func-
- tion is on, the status line displays the word CAPS, and the case
- of the alpha keys is reversed from normal. Unshifted letters are
- entered as capitals, and shifted letters are entered as lower
- case.
-
-
-
- 3.1.22 RETURN
-
- In the edit INSERT mode, this key causes a CRLF to be inserted
- into the file buffer. In the edit REPLACE mode, the cursor is
- moved to the beginning of the next line, and characters are not
- inserted into the file buffer unless the cursor was positioned at
- the last character in the file. During command entry, RETURN
- selects the currently highlighted keyword, and is equivalent to
- pressing the key corresponding to the first character in that
- keyword.
-
-
-
- 3.1.23 BACKSPACE
-
- Delete the character to the left of the cursor.
-
-
-
- 3.1.24 TAB
-
- In the REPLACE mode, this key positions the cursor at the next
- defined tab stop. In the INSERT mode, this key either inserts
-
-
-
- (E.Y.G.) - 14 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- the ASCII tab character in the file buffer, or inserts the number
- of spaces required to move the cursor to the next tab stop. The
- commands Define No-tabs and Define Use-tabs control which charac-
- ter is inserted.
-
-
-
- 3.2 Control Characters
-
- Control characters are special codes in the ASCII character set
- that control devices such as printers, modems, etc. These
- characters have ASCII codes from 0 to 31 decimal. Control
- characters can be entered into the file buffer by holding down
- the CTRL key and striking an alpha key.
-
- With a few exceptions, control characters are displayed as spe-
- cial graphics characters. Consult your computer user's manual
- for a description of the complete character set.
-
- All the control characters, with the exception of space, tab, and
- the CRLF sequence, are treated as zero-width characters by the
- Block Fill and Block Justify commands. This allows the correct
- formatting of paragraphs that contain control characters which
- will later be expanded into printer control sequences by a print
- formatter program (Wordstar, for example).
-
- Several of these codes have special meaning within the editor:
-
-
-
- 3.2.1 Substitute (CTRL-Z)
-
- This code is used by both MS-DOS and the editor to mark the end
- of a file. It cannot be inserted into a file buffer from the
- keyboard. When a file buffer is written to a disk, this charac-
- ter is appended to the file.
-
-
-
- 3.2.2 Carriage Return (CTRL-M)
-
- If this character is followed immediately in the file buffer by a
- line feed (CTRL-J), the pair marks the end of a line. Neither
- character is then displayed and subsequent characters in the file
- buffer are displayed on the next line. If a carriage return is
- followed by any character other than a line feed, it is displayed
- as a special graphics character, and subsequent characters in the
- file buffer are displayed on the same line. When the RETURN key
- is pressed in the edit INSERT mode, a carriage return and a line
- feed (CRLF) are inserted into the file buffer.
-
-
-
-
-
-
- (E.Y.G.) - 15 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.2.3 Line Feed (CTRL-J)
-
- If this character is preceeded immediately in the file buffer by
- a carriage return (CTRL-M), the pair marks the end of a line.
- Neither character is then displayed and subsequent characters in
- the file buffer are displayed on the next line. If a line feed
- is preceeded by any character other than a carriage return, it is
- displayed as a special graphics character, and subsequent charac-
- ters in the file buffer are displayed on the same line. When the
- RETURN key is pressed in the edit INSERT mode, a carriage return
- and a line feed (CRLF) are inserted into the file buffer.
-
-
-
- 3.2.4 Escape (CTRL-[)
-
- This code can be entered into a file buffer by holding down the
- CTRL key and pressing the key with the left bracket symbol ([).
- This is not to be confused with the ESC key, which does not enter
- an escape character into the file buffer, but is used to begin a
- command or back up out of the command tree.
-
-
-
- 3.2.5 Backspace (CTRL-H)
-
- This character can be inserted in the file buffer and is dis-
- played as a special graphics character. The BACKSPACE key on the
- keyboard does not insert this character into the file buffer, but
- instead performs an editing function described elsewhere in this
- chapter.
-
-
-
- 3.2.6 Tab (CTRL-I)
-
- The tab character is used in text files to save space by repre-
- senting a variable number of spaces. The editor permits you to
- define the columns at which tab stops occur. When the file buff-
- er is displayed, tab characters are expanded on the screen so
- that the correct format of the text is seen. The area between
- the tab characters and the next tab stop appears as blank space
- on the screen. This area cannot be edited and the cursor skips
- over it.
-
- Tabs can be inserted into the file buffer using the TAB key. If
- the command Define No-tabs has been given, the keyboard TAB key
- causes ASCII spaces to be inserted into the file buffer in place
- of tab characters.
-
-
-
-
-
-
-
- (E.Y.G.) - 16 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3 Commands
-
- The following commands are begun by pressing the ESCAPE key.
- Commands are entered by giving the first character of the command
- keywords.
-
-
-
- 3.3.1 Adjust
-
- This command is used to change the indentation of lines in the
- file buffer. While invoked, the four cursor control arrow keys
- are temporarily redefined to control this indentation. The LEFT
- and RIGHT arrow keys shift the entire current line to the left or
- right. The message line displays the number of columns that the
- current line has been shifted. A shift toward the left margin is
- displayed as a negative number.
-
- The UP and DOWN arrow keys move the cursor to the previous or
- next line and shift the new line the number of columns displayed
- on the message line. Thus a number of consecutive lines can be
- easily shifted by the same offset.
-
- The Adjust command is terminated by pressing the ESCAPE key.
-
- The Adjust command performs its shifting by inserting or deleting
- leading spaces and tabs. If the Define Use-tabs command is in
- effect (the default condition), leading spaces on each adjusted
- line will be consolidated into tab characters wherever it is pos-
- sible to so (by the same rules followed by the Convert
- Spaces->tabs command).
-
-
-
- 3.3.2 Block Append
-
- Add the text between the marker and the cursor to the end of the
- block buffer. The size of the block buffer is expanded to accom-
- modate the additional text. The text in the file buffer is not
- changed.
-
-
-
- 3.3.3 Block Copy
-
- Copy the text between the marker and the cursor into the block
- buffer. Any previous contents of the block buffer are overwrit-
- ten. The text in the file buffer is not changed.
-
-
-
-
-
-
-
-
- (E.Y.G.) - 17 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.4 Block Delete
-
- Delete the text between the marker and the cursor from the file
- buffer, and move it into the block buffer. The previous contents
- of the block buffer are overwritten.
-
-
-
- 3.3.5 Block Fill
-
- Format a group of lines, from the line pointed to by the marker
- to the current line, into paragraphs so that all enclosed text is
- contained within the paragraph margins. As many words as pos-
- sible are packed onto each line using a single space between
- words, and two spaces following words that end with a period (.),
- exclamation mark (!), or question mark (?).
-
- A line following a blank line is interpreted as the beginning of
- a new paragraph, and its left margin is set to the value defined
- as the paragraph margin. The first line in the blocked region
- (the line to which the marker points) is assumed to be the first
- line of a paragraph and is also indented to the value of the
- paragraph margin.
-
-
-
- 3.3.6 Block Insert
-
- Insert the text held in the block buffer into the file buffer at
- the cursor position. The block buffer is not changed.
-
-
-
- 3.3.7 Block Justify
-
- This command performs all the actions of the Block Fill command,
- then adds additional spaces between words so that the last
- character on each formatted line is flush with the right margin.
- This gives formatted text a more formal appearance.
-
-
-
- 3.3.8 Block Print
-
- Print the text between the marker and the cursor. The text is
- sent to the primary MS-DOS printer (otherwise identified as the
- PRN or LPT1 device). The text is sent exactly as it appears in
- the file buffer, except that tab characters are expanded into the
- appropriate number of ASCII spaces.
-
-
-
-
-
-
-
- (E.Y.G.) - 18 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.9 Block Write
-
- Write the text between the marker and the cursor to a disk file.
- Invoking this command causes the editor to prompt for a filename.
- If the file you specify already exists, its contents are over-
- written with the text from the indicated region of the file buff-
- er. If the file does not exit it is created in the current
- directory. The text in the file buffer is not changed.
-
-
-
- 3.3.10 Convert Lowercase->uppercase
-
- Convert all alpha characters between the marker and cursor to up-
- percase.
-
-
-
- 3.3.11 Convert Spaces->tabs
-
- Convert ASCII space characters to tabs in the text between the
- marker and the cursor. The appearance of the file buffer in the
- display window remains unchanged, but the file buffer size can
- decrease significantly. The conversion is done as follows:
-
- 1. If two or more consecutive spaces directly preceed a tab
- stop column, those spaces are replaced by a single tab
- character.
-
- 2. If one or more consecutive spaces do not directly preceed a
- tab stop column, but are followed by a tab character, those
- spaces are deleted.
-
- 3. Spaces within literal strings are not converted. All
- spaces following a single or double quote character on a
- line remain unchanged.
-
-
-
- 3.3.12 Convert Tabs->spaces
-
- Convert tab characters to the equivalent number of ASCII spaces
- in the text between the marker and the cursor. The appearance of
- the file buffer in the display window remains unchanged, but its
- size can increase significantly. This command can be used to
- "freeze" the format of a file buffer containing tab characters,
- making the spacings in the buffer independent of changes in tab
- stop definitions, or of different interpretation by other
- programs.
-
-
-
-
-
-
-
- (E.Y.G.) - 19 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.13 Convert Uppercase->lowercase
-
- Convert all alpha characters in the text between the marker and
- the cursor to lowercase.
-
-
-
- 3.3.14 Define Case
-
- Make the Replace and Search commands sensitive to the case of the
- target string. When this command is in effect, the case of alpha
- characters in the search string must agree with the case of the
- the characters in the file buffer for a match to occur. The
- status line displays a highlighted "CA" when this command is ac-
- tive.
-
-
-
- 3.3.15 Define Ignore
-
- Ignore the case of alpha characters during the execution of
- Replace and Search commands. This is the default operation of
- the editor. When this command is in effect, the case of alpha
- characters in the search string can be different from the case of
- characters in the file workspace, and a match can still exist.
-
-
-
- 3.3.16 Define Marker
-
- Define the marker to point to the character at the cursor loca-
- tion. The marker is not a character itself, but a pointer to a
- location in the file buffer. It is not visible, and cannot be
- displayed. It is used to mark the beginning of a region of text
- to be operated on by another command, or to mark a location in
- the file buffer that can be easily returned to using the Jump
- Marker command. When a file is read into the file buffer, the
- marker is initialized to point to the first character in the
- buffer.
-
-
-
- 3.3.17 Define No-tabs
-
- Define the operation of the TAB key such that ASCII space charac-
- ters, instead of a tab character, are inserted into the file
- buffer when this key is pressed. The status line displays a
- highlighted "SP" when this command is in effect.
-
-
-
-
-
-
-
-
- (E.Y.G.) - 20 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.18 Define Paragraph
-
- Define the margins used for paragraph formatting and wordwrap
- operation. This command allows you to enter new values used for
- the left margin, the right margin, and the margin used for the
- first line of each new paragraph (paragraph indent). When in-
- voked, the current values are displayed, and one, two or three
- new values can be entered. Since it is quite common for
- paragraphs to be formatted with the paragraph indent equal to the
- left margin, the following rules apply:
-
- - If a single new value is entered, it is used for both the
- left margin and the paragraph indent, and the right margin
- remains unchanged.
-
- - If two values are entered, the first value is used for both
- the left margin and the paragraph indent, and the second is
- used for the new right margin.
-
- - If three values are entered, all three margins are changed
- independently.
-
-
-
- 3.3.19 Define Tabs Fixed
-
- Define a fixed interval for tab stops. When this command is in-
- voked, the previous tab interval is displayed. If the RETURN key
- is pressed immediately, the tab interval will remain unchanged.
- To change the fixed tab interval, enter a number between 2 and
- 100, then press RETURN. The default tab interval is 8 (tab stops
- every 8 columns, beginning in column 9).
-
-
-
- 3.3.20 Define Tabs Variable
-
- Define tab stops at individual columns. When this command is in-
- voked, you are prompted to enter a list of column numbers. Enter
- the tab stops as a list of numbers in the range from 1 to 255,
- separated by commas or spaces, then press RETURN. The column
- numbers may be entered in any numeric order. Note that lines
- within the editor can be as long as 1000 characters, but in-
- dividual tab stops can only be defined for the first 255 columns.
- Example:
-
- Enter tab columns: 13,35,75
-
- The example shows tab stops defined for three columns. If the
- tab key is pressed and the cursor is past column 74 on a line,
- the cursor will move to column 13 on the next line. In the
- INSERT mode, this would insert CRLF and either a tab or 12 spaces
- into the file workspace.
-
-
-
- (E.Y.G.) - 21 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.21 Define Use-tabs
-
- Define the operation of the TAB key so that ASCII tab characters,
- instead of the equivalent number of spaces, are inserted in the
- file buffer when the key is pressed. This is the default opera-
- tion of the editor.
-
-
-
- 3.3.22 Define Wordwrap Disable
-
- This command disables the wordwrap typing mode. This is the
- default operation of the editor.
-
-
-
- 3.3.23 Define Wordwrap Enable
-
- This command enables the wordwrap typing mode. This mode allows
- text to be entered without concern for ending lines with the
- RETURN key. After every character other than space or tab is
- entered, the column number of the cursor is compared to the right
- margin. If the new character caused a word to extend beyond the
- right margin, a CRLF is inserted after the previous word, and the
- current word is moved to the next line and indented to the left
- margin.
-
- If the RETURN key is pressed with wordwrap enabled, the cursor
- moves to the left margin column on the following line.
-
- A highlighted "WR" is displayed on the status line whenever
- wordwrap is enabled.
-
-
-
- 3.3.24 File Command
-
- Temporarily exit to MS-DOS from within the editor. This command
- allows you to invoke MS-DOS commands and run programs without
- quitting the editor. When this command is invoked, the operation
- of the editor is temporarily suspended, and the shell program
- specified by the "COMSPEC=" parameter in the environment is ex-
- ecuted. On most systems this program is COMMAND.COM, the MS-DOS
- command parser.
-
- To return to the editor, give the MS-DOS EXIT command. All
- editor parameters, including the contents of all buffers, the
- screen display, and cursor position, will be exactly as they were
- before File Command was invoked. In addition, the current disk
- and current directory are restored to their previous values.
-
- File Command will not execute if there is insufficient memory to
- execute the shell, if there is no "COMSPEC=" parameter in the
-
-
-
- (E.Y.G.) - 22 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- environment, or if the shell program cannot be found in the
- specified drive and directory.
-
-
-
- 3.3.25 File Edit
-
- Abandon the current contents of the active file buffer and begin
- editing another file in the same buffer. You are prompted to
- enter a disk filename. If the file that you specify is found, it
- is read into the file buffer. If the file is not found on the
- disk, a new file is created, and an empty file buffer is dis-
- played.
-
-
-
- 3.3.26 File Merge
-
- Merge the contents of a disk file into the file buffer at the
- cursor location. You are prompted for the name of the source
- file. The source file is not altered.
-
-
-
- 3.3.27 File Other
-
- Create a second file buffer if only one is in use, or switch to
- the other file buffer if two buffers are in use. If only one
- file buffer is in use, you are prompted for the name of another
- disk file. If the file that you specify is found, it is read
- into a newly created file buffer. If the file is not found on
- the disk, a new file is created, and an empty file buffer is dis-
- played.
-
- When two file buffers are in use, each buffer has its own inde-
- pendent definitions of marker, tabs, case/ignore, margins, and
- wordwrap enable/disable. The block buffer and the deleted line
- buffer are common to both file buffers, allowing text to be moved
- or copied between them.
-
-
-
- 3.3.28 File Profile
-
- Save the state of tabs and other "Defined" parameters in a con-
- figuration file. To use this command, a parameter must already
- be SET in the MS-DOS environment, naming the directory where con-
- figuration files will be read and written. The environment
- parameter should have the form
-
- EDCONFIG=<dir>
-
-
-
-
-
- (E.Y.G.) - 23 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- where <dir> is a disk directory name. When written, the
- configuration file will have the format
-
- <dir>\EDCONFIG.<ext>
-
- <ext> is the file extension of the filename associated with the
- currently active file buffer. Configuration files are discussed
- in a previous section of this manual.
-
-
-
- 3.3.29 File Quit
-
- Abandon the contents of the current file buffer without saving.
- If a single file buffer is in use, this command causes an exit to
- MS-DOS. If two file buffers are in use, the current file buffer
- is abandoned and the other file buffer is made active and dis-
- played. If any changes were made to the current buffer, you are
- asked to confirm that you wish to quit.
-
-
-
- 3.3.30 File Save+exit
-
- Save the contents of the file buffer, then exit the buffer. If a
- single file buffer is in use, this command causes an exit to
- MS-DOS after the file is written to the disk. If two file buff-
- ers are in use, the current file buffer is exited after the file
- is written, and the other file buffer is displayed. A backup of
- the original file is saved under a filename with the same prefix
- as the original and with the extension ".BAK".
-
-
-
- 3.3.31 File Update
-
- Write the file buffer to the disk and continue editing in the
- current buffer. As with File Save+exit, a backup file is kept,
- and a configuration file may be created if certain conditions are
- met.
-
-
-
- 3.3.32 File Write
-
- Write the current file buffer to a disk filename entered by the
- user. You are prompted for a filename. A backup file is not
- created by this command.
-
-
-
-
-
-
-
-
- (E.Y.G.) - 24 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.33 Jump Beginning
-
- Position the cursor at the first character in the file buffer.
- This command is identical to pressing the HOME key.
-
-
-
- 3.3.34 Jump End
-
- Position the cursor at the last character in the file buffer.
- This command is identical to pressing the SHIFT-HOME (END) key.
-
-
-
- 3.3.35 Jump Line
-
- Position the cursor at the beginning of a specific line. Line
- numbers are computed by counting CRLFs starting with the first
- line of the file buffer. The current line number is displayed on
- the status line.
-
-
-
- 3.3.36 Jump Marker
-
- Position the cursor at the character pointed to by the marker.
-
-
-
- 3.3.37 Replace
-
- Search for a target string of characters and conditionally re-
- place it with a replacement string of characters. The case of
- alpha characters in the target string is ignored during the
- search unless the Define Case command has been given. After you
- have entered both strings, the cursor is moved to the first
- matching occurrence of the target string, and you can select from
- the following command line options:
-
- All. Replace all occurrences from the cursor to the end of
- the file buffer, then return to the edit mode.
-
- Continue. Replace the occurrence shown at the cursor, and con-
- tinue searching.
-
- Once. Replace the occurrence shown at the cursor, then return
- to the edit mode.
-
- Skip. Don't replace the occurrence shown at the cursor, but
- continue searching for the next.
-
- Quit. Return to the edit mode.
-
-
-
-
- (E.Y.G.) - 25 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.3.38 Search
-
- Search for a target character string. The case of alpha charac-
- ters in the target string is ignored during the search unless the
- Define Case command has been given. After the target string is
- entered, you have the following command options:
-
- Forward. Search forward toward the end of the file buffer for
- the target string.
-
- Backward. Search backward toward the beginning of the file buffer
- for the target string.
-
- Quit. Quit searching and return to the edit mode.
-
-
-
- 3.3.39 Undelete
-
- Insert at the cursor position the last line deleted by either the
- DELETE LINE or CLEAR LINE key.
-
-
-
- 3.3.40 Window 1-window
-
- Set the screen display to single window mode. If the screen is
- not in 2-windows mode, the command is ignored.
-
-
-
- 3.3.41 Window 2-windows
-
- Divide the screen display into two windows separated by a line of
- hyphens. If the screen is already in the 2-window mode, the com-
- mand is ignored. If two file buffers are in use, each buffer is
- displayed in one of the windows. If one file buffer is in use,
- each window displays a portion of that buffer. The window con-
- taining the cursor is the active window. The command, message,
- and status lines display information about the currently active
- window.
-
-
-
- 3.3.42 Window Other-window
-
- Make the other window active in 2-windows mode. If the screen
- display is in 1-window mode, the command is ignored. The cursor
- is moved to its previous position in the other window. The com-
- mand, message, and status lines display information about the
- currently active window.
-
-
-
-
-
- (E.Y.G.) - 26 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 3.4 MS-DOS Command Line Switches
-
- MS-DOS provides a means of passing the parameters that were given
- on the command line to the program when it is invoked. The for-
- ward slash (/) is defined as the switch character. Application
- programs such as the editor interpret the characters following
- the switch character as an optional command. The editor recog-
- nizes two switches that alter the size of its memory pool.
- Another switch allows "document" files created by some word
- processors to be edited.
-
-
-
- 3.4.1 /a
-
- Use all available memory for the memory pool. The editor normal-
- ly uses 14K bytes less than the maximum available memory to avoid
- overwriting COMMAND.COM. Examples:
-
- A>ed /a
- A>ed sample.pas /a
-
-
-
- 3.4.2 /d
-
- Clear the most significant bit (bit 7) of each character read
- from a file during the edit session. This converts "document"
- files created by some word processors into standard ASCII text.
-
-
-
- 3.4.3 /m<blocks>
-
- Use <blocks> number of 1000-byte memory blocks for the memory
- pool. This switch is useful if you want to reserve a part of
- memory that you don't want overwritten by the editor. If you
- specify a number less than 20, 20 blocks are used. If you
- specify a larger number of blocks than are available, all the
- available memory is used. Examples:
-
- A>ed /m30 (Use 30,000 bytes)
- A>ed sample.pas /m355 (Use 355,000 bytes)
-
-
-
- 3.5 Environment Parameters
-
- The editor looks for a substring in the MS-DOS environment of the
- form "EDCONFIG=<dir>". If such a substring is found, the editor
- is enabled to read and write configuration files, which will be
- kept in the named directory. Configuration files are described
- in an earlier section of this manual.
-
-
-
- (E.Y.G.) - 27 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- When File Command is invoked, the environment is searched for a
- substring of the form "COMSPEC=<filespec>". Refer to the
- description of this command elsewhere in this section.
-
-
-
-
- 4. EDITING TECHNIQUES
-
- This section gives helpful examples of the use of some editor
- commands. Readers that are familiar with the use of text editors
- can skip this section.
-
-
-
- 4.1 Defining a Block
-
- Many commands operate on a group of characters defined as a
- block. A block can be part of a line, a few lines, or the entire
- file. A block is defined by the following steps:
-
- 1. Move the cursor to the first character in the block.
-
- 2. Execute the command Define Marker.
-
- 3. Now move the cursor to the first character past the end of
- the block. If you want the block to include a CRLF move
- the cursor to the first character of the line following the
- block. The block is now defined by the marker and cursor
- positions.
-
-
-
- 4.2 Moving a Block
-
- To move a block of text from one part of a file to another,
- delete the block using the Block Delete command. This deletes
- the block from its original position and moves it into the block
- buffer. Now move the cursor to the new location for the block
- and use the command Block Insert.
-
-
-
- 4.3 Making Multiple Copies of a Block
-
- If you have a section of text that you want to reproduce at
- several places, use the Block Copy command to copy the the block
- into the block buffer, then move the cursor to each location that
- the block is to be reproduced and execute the Block Insert com-
- mand.
-
-
-
-
-
-
- (E.Y.G.) - 28 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 4.4 Moving or Copying a Line
-
- A single line can be moved using the block commands, but another
- method requires fewer keystrokes. Place the cursor anywhere on
- the line to be moved and delete the line using the DELETE LINE
- key. Then move the cursor to the line's new destination, and ex-
- ecute the Undelete command. The entire line is moved, including
- the CRLF terminator.
-
- To copy a line, first delete the line, then immediately re-insert
- it with the Undelete command, then move the cursor anywhere
- copies are needed and Undelete it again.
-
-
-
- 4.5 Moving or Copying Blocks Between Files
-
- There are two techniques of transferring blocks between disk
- files. The choice of techniques depends on the available memory
- and the size of the source and destination files.
-
- Method 1: Source and destination files are small enough to both
- reside in the editor's two file buffers at the same
- time.
-
- 1. Read each file into a file buffer. Use the File Edit
- command to read the first file, and File Other to
- read the second.
-
- 2. Copy or Delete the block from the source file into
- the block buffer as described earlier.
-
- 3. Move the cursor to the destination file using the
- File Other command and use the Block Insert command.
-
- Method 2: The available memory pool is only large enough to
- hold each file separately.
-
- 1. Read the source file into the editor and Copy or
- Delete the block into the block buffer.
-
- 2. Use the File Edit command to overwrite the source
- file buffer with the destination file. Position the
- cursor in the destination file buffer and give the
- Block Insert command.
-
-
-
- 4.6 Positioning the Cursor Quickly in Large Files
-
- When editing large programs, it is often necessary to move be-
- tween widely scattered locations within the file buffer. The
- ability to make these movements rapidly can save a lot of time
-
-
-
- (E.Y.G.) - 29 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- and frustration. You can use any of the following techniques.
-
- - Use the Windows 2-windows command to split the screen into
- two different views on a file buffer. This powerful com-
- mand allows you to view any part of a file buffer while you
- edit another.
-
- - Define the marker at a position that you will return to
- often. The Jump Marker command will move you to that posi-
- tion quickly.
-
- - Note the line number of a position that you go to frequent-
- ly, and use the Jump Line command to return there. The
- current line number is always shown on the status line.
-
- - If you need to be near the beginning or end of the buffer,
- use the HOME or SHIFT-HOME (END) keys.
-
- - The paging keys, PREV (PgUp) and NEXT (PgDn), move the dis-
- play window through the file very quickly. As with most
- keys, they repeat automatically when held down. You won't
- be able to read the text as it flies by, but you can
- monitor the line numbers displayed on the status line.
-
- - If you know a unique character string in the text near your
- destination, such as a variable name or function name, use
- the Search command to move there quickly.
-
-
-
- 4.7 Replace Applications
-
- Replace is a useful command with many applications. Some common
- uses are renaming a variable or function name, or renumbering a
- BASIC program after moving a block of code. The following ex-
- amples illustrate some capabilities of this command which might
- not be immediately apparent.
-
-
-
- 4.7.1 Global Delete
-
- The Replace command can be used to delete some or all occurrences
- of a string. To do this, you must make the replacement string be
- the null string (no characters). The first time you execute this
- command, the default replacement string is null and you can simp-
- ly press RETURN when you are prompted with "Replace with what?".
- However, once you have defined a replacement string, pressing
- RETURN will enter the last replacement used. In this case, press
- the BACKSPACE key first, then the RETURN key to enter a null
- string. You will then be able to selectively delete each occur-
- rence of the search target.
-
-
-
-
- (E.Y.G.) - 30 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 4.7.2 Anchoring a Search Pattern to the Beginning or End of a
- Line
-
- You can include the end-of-line terminators CRLF as part of your
- search target by entering a CONTROL-M followed by a CONTROL-J
- into the search string. This allows you to restrict the scope of
- a search or replace operation to matching strings which occur at
- the beginning or the end of a line.
-
-
-
- 4.8 Flexibility With Tabs
-
- The TAB key allows you to format, indent, and comment your
- programs in a consistent, readable style using a minimum of
- keystrokes. You have the choice of defining tab stops at fixed
- intervals or at specific column numbers. Fixed intervals are
- useful for indenting most structured programming languages. The
- editor defaults to tab stops every 8 columns.
-
- In addition to defining tab stops, you also have the choice with
- the operation of the TAB key between inserting tab characters or
- inserting the number of spaces required to move the cursor to the
- next tab stop. Using spaces rather than tab characters has the
- advantage that the format of the file is fixed and independent of
- tab definitions. The editor defaults to using tab characters in
- files, resulting in smaller file sizes. To change the operation
- of this key, use the Define No-tabs command.
-
- You may find it necessary to convert a section of code that con-
- tains tab characters, and replace the tabs with the correct num-
- ber of spaces. This eliminates any problems that the tab charac-
- ters might cause when using the file with another program, such
- as a print utility. The conversion can be done by defining the
- section of code (or the entire file) as a block using the marker
- and cursor, and executing the Convert Tabs->spaces command.
-
- At times it is helpful to be able to convert spaces to tab
- characters. This has other benefits besides making files
- smaller. You can, for example, take a file that was indented for
- printing on a 132 column page, define tab stops at the original
- indent columns, and convert groups of spaces in the file to tab
- characters. By re-defining the tab stops at smaller intervals,
- you may be able to compress the spacing of the file so that it
- can be printed on an 80 column page.
-
-
-
- 4.9 Dealing With Limitations of Computer Memory
-
- The editor can only edit files that fit entirely within its file
- workspace. On a typical MS-DOS computer system with 256K memory,
- files as large as 155,000 bytes can be edited. If your computer
-
-
-
- (E.Y.G.) - 31 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- has additional memory you can edit files as large as 580,000
- bytes (545,000 on an HP150).
-
- The status line displays the number of free bytes available to
- the editor. When this number approaches zero, you are prevented
- from inserting additional characters into the buffer. If you try
- to insert characters into a full buffer, you will receive the
- following message:
-
- **** Insufficient free memory for last command. ****
-
- You will be permitted to continue editing and to save the file,
- but to continue adding characters to the file buffer you must in-
- crease its size. The following suggestions may help:
-
- - Use the /A switch when you start the editor. This gives an
- additional 19K bytes to the buffer space.
-
- - Don't use two file buffers when editing large files.
-
- - Use tab characters in the file buffer where possible.
-
- - If you have moved any text into the block buffer, you can
- release that memory to the file buffer by defining a block
- of a single character and using the Block Copy command.
-
- - Break the file up into two smaller files. If the file fits
- in the editor's file buffer, use the Block Write command
- for this purpose. If the file is too large to read into
- the buffer, use DEBUG's Name and Write commands to split
- the file.
-
-
-
- 4.10 Dealing With Limitations of Disk Space
-
- The normal procedure for exiting the editor is to use the File
- Save+exit command. This keeps a backup of the original file
- along with the current changes on the same disk. There must
- therefore be enough space on the disk for two copies of the file.
- If this becomes a problem, use one of the following alternatives:
-
- - Use the File Write command to save the file. This command
- does not create an automatic backup file.
-
- - Insert a formatted blank disk to save the changes to the
- file. You can change disks any time during the edit ses-
- sion except at those times when the disk is being accessed.
-
- - Use File Command to temporarily exit to MS-DOS, and delete
- or move files from the disk to create additional space.
-
-
-
-
-
- (E.Y.G.) - 32 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- 5. MESSAGES
-
- This section explains the meanings of messages generated by the
- editor.
-
-
- Can't delete old .BAK file.
-
- Before writing the file buffer to disk, the editor at-
- tempted to delete the old backup file and could not. This
- can occur if the file has the readonly attribute.
-
-
- Define block begin/end with marker and cursor.
-
- You gave a block command, but the cursor is either at the
- marked character or closer to the beginning of the file
- buffer. The block commands use the marker position as the
- beginning of the block and the cursor as the end of the
- block.
-
-
- Drive not ready.
-
- The disk cannot be accessed. Some possible reasons are:
-
- - The disk may be write protected.
-
- - The line power to the disk may be off.
-
- - You may have specified a non-existent drive. Check
- the drive letter specification in the filename.
-
- - The disk drive door may be open.
-
- Try to correct the problem and retry the command.
-
-
- *** ED requires 80X25 video display mode ***
-
- The equipment switches in an IBM compatible PC are not set
- for an 80 column display. The editor cannot be run using a
- 40 column display.
-
-
- Edit what file?
-
- You are being asked for the name of either an existing disk
- file to be edited, or a new filename that will be created.
- Filenames can include drive and path specifiers. Refer to
- your MS-DOS User's Guide for a complete description of
- filenames.
-
-
-
-
- (E.Y.G.) - 33 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- Editing file <file>
-
- The editor is in the edit mode. <file> is the name of the
- file that is displayed in the active file buffer.
-
-
- Editing new un-named file
-
- You are editing a new file that is not yet named. You can
- name the file when you save the file buffer.
-
-
- Enter new left margin column, and optionally, right margin and
- paragraph indent.
-
- The number(s) that you entered as new paragraph margins
- were either out of range, or mistyped. If more than one
- number is entered, use spaces or commas as separators.
- Margins can range from columns 1 to 999. It is an error to
- specify a right margin as smaller than the left margin.
-
-
- Enter tab stops as a list of numbers between 1 and 255 separated
- by commas.
-
- In defining tab stop columns, you entered a number that is
- outside of the range from 1 to 255. Individual stops can
- only be defined within these limits. Enter the stops
- again, or press ESCAPE to abort the command.
-
-
- Error creating file.
-
- During the execution of either a Block Write or a File
- Write command, the editor attempted to create the named
- file and could not, possibly because:
-
- - The disk is write protected.
-
- - The filename is not valid.
-
- - There is no space left on the disk.
-
-
- Error reading file.
-
- While reading a disk file into the editor's file buffer, a
- disk error was reported by the operating system. This is
- most likely due to a problem with the disk media or the
- computer's disk drive hardware.
-
-
-
-
-
-
- (E.Y.G.) - 34 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- Error reading the configuration file.
-
- The editor configuration file being read is not the correct
- length, or has an incorrect "signature". This file has the
- filename prefix "EDCONFIG", and the same filename extension
- as the file being read into the editor's file buffer. The
- configuration file should be written again with the File
- Profile command.
-
-
- Error re-setting the default directory.
-
- When File Command is invoked, the editor saves the default
- disk drive and default directory so that it can be restored
- when the shell program is exited. This message usually in-
- dicates that the disk was removed from the default drive.
-
-
- Error shelling to command processor.
-
- The editor attempted to run the MS-DOS shell program and
- could not. Either the file could not be found in the drive
- and directory specified by the environment parameter, or
- there was insufficient memory to run the program. Check
- that the shell program (usually COMMAND.COM) is on the cor-
- rect disk.
-
-
- Error writing to file.
-
- An error was reported by the operating system while data
- was being written to a disk file. Since the file was suc-
- cessfully opened before writing began, this problem is
- probably due to a damaged or full disk. Retry the command
- using a different disk or drive.
-
-
- File extension too long.
-
- You have entered a filename with an extension that does not
- conform to the MS-DOS filename conventions. Filename ex-
- tensions may have a maximum length of three characters.
-
-
- Filename is too long.
-
- You have entered a filename having a total length which ex-
- ceeds the editor's internal capacity. The maximum total
- length of a file specification, including drive and direc-
- tory pathnames, is 70 characters.
-
-
-
-
-
-
- (E.Y.G.) - 35 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- Filename prefix is too long.
-
- You have entered a filename with an prefix that does not
- conform to the MS-DOS filename conventions. Filename
- prefixes may have a maximum length of eight characters.
-
-
- **** Insufficient free memory for last command. ****
-
- You have given a command that requires more memory than is
- currently available in the file buffer. Refer to the sec-
- tion titled "Dealing with Limitations of Computer Memory".
-
-
- ***Insufficient memory for ED***
-
- There is not enough memory available to run the editor.
- Refer to the section titled "Dealing with Limitations of
- Computer Memory".
-
-
- Marked text exceeds block buffer size by <n> characters.
-
- You attempted to Append, Copy or Delete a block that is too
- large for the available memory. You will be able to use
- the command if you make the block smaller by <n> charac-
- ters.
-
-
- No COMSPEC in environment string.
-
- You have given the File Command command and there is not a
- parameter in the MS-DOS environment of the form
- "COMSPEC=<filespec>". Use the MS-DOS SET command to enter
- the name of the shell program into the environment.
-
-
- Out of disk space.
-
- In writing a file to a disk, the disk became full. You can
- insert a new disk and give the command again. Refer to the
- section titled "Dealing with Limitations of Disk Space".
-
-
- Printer not ready.
-
- You have tried to print a block and the printer does not
- respond. Check for the following conditions:
-
- - Is the printer ON LINE?
-
- - Is it out of paper?
-
-
-
-
- (E.Y.G.) - 36 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- - Is it plugged into an AC outlet and turned ON?
-
- - Is the printer cable connected?
-
- - Is your printer configured as the PRN or LPT1 device?
-
- Either correct the condition and retry the command, or use
- the ESCAPE key to backup out of the command menus.
-
-
- READING ....
-
- A file is being read from the disk. As each 2048-byte
- block is read, an additional dot is displayed.
-
-
- Renaming original file to .BAK
-
- The editor is creating a backup file by renaming the
- original disk file to a filename with a .BAK extension.
-
-
- SHIFT = <n>
-
- While the Adjust command is in use, the current shift count
- is displayed on the message line. This is the number of
- columns that each line the cursor is moved to will be
- shifted.
-
-
- Target string not found.
-
- No match of the target string was found during a Search or
- Replace operation. Select Quit to return to the edit mode,
- or press ESCAPE to backup in the command tree and specify
- another search target.
-
-
- The fixed tab interval must be between 2 and 100.
-
- You have specified an invalid tab interval. Enter your
- choice again, or only press RETURN to keep the previous
- value active.
-
-
- Unable to open file.
-
- The file that you specified for a Merge operation could not
- be opened. Check to see if you have typed the filename
- correctly, that you have specified the correct drive and
- path if the file is not in the current directory, or that
- you have the correct disk in the drive.
-
-
-
-
- (E.Y.G.) - 37 - (printed 4-18-86)
-
-
-
-
-
- ED.EXE Program Text Editor User's Manual Version 1.05
-
-
-
- Unable to open or create file.
-
- The file that you specified to be edited could not be
- found. The editor attempted to create a file with that
- name and could not, probably because the filename is not a
- legal DOS filename or is prefixed with a non-existent path-
- name.
-
-
- WAIT .....
-
- The editor is performing an operation that may take several
- seconds to complete.
-
-
- Writing block to file <file>
-
- The editor has successfully opened <file> and is writing
- the marked text to it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (E.Y.G.) - 38 - (printed 4-18-86)
-
-
-
-
-
-
-
-
-
- TABLE OF CONTENTS
-
-
- 1. GENERAL INFORMATION.........................................1
- 1.1 Program Versions and Requirements.........................2
-
- 2. EDITOR OPERATION...........................................2
- 2.1 Running the Editor........................................2
- 2.2 Crossing Directories......................................3
- 2.3 Exiting the editor........................................3
- 2.4 Use of Computer Memory....................................3
- 2.5 File Buffers..............................................4
- 2.5.1 The Block Buffer.......................................4
- 2.5.2 The Deleted Line Buffer................................4
- 2.6 Edit Modes................................................5
- 2.7 Command Mode..............................................5
- 2.8 The Display Screen........................................6
- 2.8.1 The Command Line.......................................6
- 2.8.2 The Message Line.......................................6
- 2.8.3 The Status Line........................................6
- 2.8.4 The File Windows.......................................7
- 2.9 Moving the Cursor.........................................7
- 2.10 The Marker...............................................8
- 2.11 Saving the File Buffer...................................9
- 2.12 Editor Configuration Files...............................9
- 2.12.1 Enabling Configuration Files.........................10
- 2.12.2 Writing a Configuration File.........................10
- 2.12.3 Disabling Configuration Files........................11
-
- 3. GENERAL REFERENCE..........................................11
- 3.1 Special Editing Keys.....................................11
- 3.1.1 ESCAPE (or F8)........................................11
- 3.1.2 CLEAR LINE (SHIFT-END)................................11
- 3.1.3 DELETE LINE (SHIFT-DEL)...............................12
- 3.1.4 DELETE CHAR (DEL).....................................12
- 3.1.5 INSERT CHAR (INS).....................................12
- 3.1.6 INSERT LINE (SHIFT-INS)...............................12
- 3.1.7 HOME..................................................12
- 3.1.8 SHIFT-HOME (END)......................................12
- 3.1.9 UP....................................................12
- 3.1.10 DOWN.................................................13
- 3.1.11 LEFT.................................................13
- 3.1.12 RIGHT................................................13
- 3.1.13 SHIFT-UP.............................................13
- 3.1.14 SHIFT-DOWN...........................................13
- 3.1.15 SHIFT-LEFT...........................................13
- 3.1.16 SHIFT-RIGHT..........................................13
- 3.1.17 CTRL-LEFT............................................13
- 3.1.18 CTRL-RIGHT...........................................14
- 3.1.19 PREV (PgUp)..........................................14
- 3.1.20 NEXT (PgDn)..........................................14
- 3.1.21 CAPS (CAPS LOCK).....................................14
- 3.1.22 RETURN...............................................14
-
-
-
- - i -
-
-
-
-
-
-
-
-
-
- 3.1.23 BACKSPACE............................................14
- 3.1.24 TAB..................................................14
- 3.2 Control Characters.......................................15
- 3.2.1 Substitute (CTRL-Z)...................................15
- 3.2.2 Carriage Return (CTRL-M)..............................15
- 3.2.3 Line Feed (CTRL-J)....................................16
- 3.2.4 Escape (CTRL-[).......................................16
- 3.2.5 Backspace (CTRL-H)....................................16
- 3.2.6 Tab (CTRL-I)..........................................16
- 3.3 Commands.................................................17
- 3.3.1 Adjust................................................17
- 3.3.2 Block Append..........................................17
- 3.3.3 Block Copy............................................17
- 3.3.4 Block Delete..........................................18
- 3.3.5 Block Fill............................................18
- 3.3.6 Block Insert..........................................18
- 3.3.7 Block Justify.........................................18
- 3.3.8 Block Print...........................................18
- 3.3.9 Block Write...........................................19
- 3.3.10 Convert Lowercase->uppercase.........................19
- 3.3.11 Convert Spaces->tabs.................................19
- 3.3.12 Convert Tabs->spaces.................................19
- 3.3.13 Convert Uppercase->lowercase.........................20
- 3.3.14 Define Case..........................................20
- 3.3.15 Define Ignore........................................20
- 3.3.16 Define Marker........................................20
- 3.3.17 Define No-tabs.......................................20
- 3.3.18 Define Paragraph.....................................21
- 3.3.19 Define Tabs Fixed....................................21
- 3.3.20 Define Tabs Variable.................................21
- 3.3.21 Define Use-tabs......................................22
- 3.3.22 Define Wordwrap Disable..............................22
- 3.3.23 Define Wordwrap Enable...............................22
- 3.3.24 File Command.........................................22
- 3.3.25 File Edit............................................23
- 3.3.26 File Merge...........................................23
- 3.3.27 File Other...........................................23
- 3.3.28 File Profile.........................................23
- 3.3.29 File Quit............................................24
- 3.3.30 File Save+exit.......................................24
- 3.3.31 File Update..........................................24
- 3.3.32 File Write...........................................24
- 3.3.33 Jump Beginning.......................................25
- 3.3.34 Jump End.............................................25
- 3.3.35 Jump Line............................................25
- 3.3.36 Jump Marker..........................................25
- 3.3.37 Replace..............................................25
- 3.3.38 Search...............................................26
- 3.3.39 Undelete.............................................26
- 3.3.40 Window 1-window......................................26
- 3.3.41 Window 2-windows.....................................26
- 3.3.42 Window Other-window..................................26
- 3.4 MS-DOS Command Line Switches.............................27
-
-
-
- - ii -
-
-
-
-
-
-
-
-
-
- 3.4.1 /a....................................................27
- 3.4.2 /d....................................................27
- 3.4.3 /m<blocks>............................................27
- 3.5 Environment Parameters...................................27
-
- 4. EDITING TECHNIQUES.........................................28
- 4.1 Defining a Block.........................................28
- 4.2 Moving a Block...........................................28
- 4.3 Making Multiple Copies of a Block........................28
- 4.4 Moving or Copying a Line.................................29
- 4.5 Moving or Copying Blocks Between Files...................29
- 4.6 Positioning the Cursor Quickly in Large Files............29
- 4.7 Replace Applications.....................................30
- 4.7.1 Global Delete.........................................30
- 4.7.2 Anchoring a Search Pattern to the Beginning or End of
- a Line 31
- 4.8 Flexibility With Tabs....................................31
- 4.9 Dealing With Limitations of Computer Memory..............31
- 4.10 Dealing With Limitations of Disk Space..................32
-
- 5. MESSAGES...................................................33
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - iii -
-
-
-
-